package com.blqy.fr.account.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blqy.fr.account.mapper.UserBillMapper;
import com.blqy.fr.account.service.UserBillService;
import com.blqy.fr.model.account.UserBill;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
@SuppressWarnings({"unchecked", "rawtypes"})
public class UserBillServiceImpl extends ServiceImpl<UserBillMapper, UserBill> implements UserBillService {

	@Transactional
	@Override
	public void saveAccount(Long userId) {
		UserBill userBill = new UserBill();
		userBill.setUserId(userId);
		this.save(userBill);
	}

	@Transactional
	@Override
	public void initAccount(Long userId) {
		UserBill userBill = new UserBill();
		userBill.setUserId(userId);
		this.save(userBill);
	}

}
